<template>
	<view class="tabbar">
		<view class="tab-item" :class="{'active':currentTab==='home'}" @click="switchhomepage">
			<!-- <image class="img" :src="currentTab==='home' ? '' : '' "></image> -->
			<span class="tab-text">首页</span>
		</view>
		<view class="tab-item" :class="{'active':currentTab==='mine'}" @click="switchmypage">
			<!-- <image class="img" :src="currentTab==='mine' ? '' : '' "></image> -->
			<span class="tab-text">我的</span>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			currentTab:{type:String , default:'home'}
		},
		methods:{
			switchhomepage() { uni.switchTab({ url: '/pages/elderlyInterface/elderly' }); },
			switchmypage() { uni.switchTab({ url: '/pages/elderlyInterface/elderlyHomepage' }); }
		}
	}
</script>

<style>
	.tabbar {
	  position: fixed;
	  bottom: 0;
	  left: 0;
	  width: 100%;
	  height: 80px;
	  display: flex;
	  justify-content: space-around;
	  align-items: center;
	  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
	  z-index: 9999;
	}
	.tab-item {
	  text-align: center;
	  color: #969696;
	}
	/* .img{
		
	} */
	.tab-text {
	  font-size: 12px;
	  margin-top: 2px;
	}    
</style>
